package com.share.bean;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * caifan 2017/10/2
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName(value="user")
public class User implements Serializable {
    private static final long serialVersionUID = 8745962127164139254L;
    @TableId(type = IdType.AUTO)
    private Long id;
    @TableField(value = "create_time")
    private Date createTime;
    @TableField(value = "update_time")
    private Date updateTime;
    @TableField(value = "delete_time")
    @TableLogic(value = "null", delval = "now()")
    private Date deleteTime;
    private String username;

    private String password;

    private String salt;

    private String nickname;

    private String email;

    private Integer age;

    private Integer status;

    @TableField(value = "last_login_time")
    private Date lastLoginTime;

    @TableField(value = "card_no", updateStrategy = FieldStrategy.IGNORED)
    private String cardNo;

    @TableField(exist = false)
    private List<Role> roleList;
}
